<template>
	<view class="flex align-center  p-2" @click="openTopicDetail">
		<image :src="data.cover" style="width:150rpx ; height:150rpx ; " class="rounded"></image>
		<view class="flex flex-column  pl-2 flex-1">
			<text class="font-md ">{{data.title}}</text>
			<text class="text-secondary text-dark">{{data.title}}</text>
			<view class="flex align-center text-secondary">
				<text class="mr-2">动态：{{data.news_count}}</text>
				<text>今日：{{data.today_count}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "topic-list",
		props: {
			data: {
				type: Object,
				default: () => {}
			}
		},
		methods: {
			openTopicDetail() {
				uni.navigateTo({
					url: '/pages/topic-detail/topic-detail?detail='+JSON.stringify(this.data)
				})
			}
		}
	}
</script>
